package com.wolf.service.impl;

import com.wolf.pojo.Wl_commodity_inventory;
import com.wolf.repository.Wl_commodity_inventoryMapper;
import com.wolf.service.Wl_commodity_inventoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Wl_commodity_inventoryServiceImpl implements Wl_commodity_inventoryService {

    @Resource
    private Wl_commodity_inventoryMapper wl_commodity_inventoryMapper;

    public void setWl_commodity_inventoryMapper(Wl_commodity_inventoryMapper wl_commodity_inventoryMapper) {
        this.wl_commodity_inventoryMapper = wl_commodity_inventoryMapper;
    }

    @Override
    public int deleteByPrimaryKey(String id) {
        return wl_commodity_inventoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Wl_commodity_inventory record) {
        return wl_commodity_inventoryMapper.insert(record);
    }

    @Override
    public int insertSelective(Wl_commodity_inventory record) {
        return wl_commodity_inventoryMapper.insertSelective(record);
    }

    @Override
    public Wl_commodity_inventory selectByPrimaryKey(String id) {
        return wl_commodity_inventoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Wl_commodity_inventory record) {
        return wl_commodity_inventoryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Wl_commodity_inventory record) {
        return wl_commodity_inventoryMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Wl_commodity_inventory> getAll() {
        System.out.println("servier");
        return wl_commodity_inventoryMapper.getAll();
    }

    @Override
    public int updateByStatus(String id, int status) {
        return wl_commodity_inventoryMapper.updateByStatus(id,status);
    }

    @Override
    public List<Wl_commodity_inventory> getBean(String commodityname, String property, Integer status, Double startprice, Double endprice) {
        return wl_commodity_inventoryMapper.getBean(commodityname,property,status,startprice,endprice);
    }

    @Override
    public List<Wl_commodity_inventory> getQuantity() {
        return wl_commodity_inventoryMapper.getQuantity();
    }

    @Override
    public List<Wl_commodity_inventory> getByCommodityId(String commodityId, String property) {
        return wl_commodity_inventoryMapper.getByCommodityId(commodityId,property);
    }
}
